/*
 * XML Type:  discriminator-column
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorColumn
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML discriminator-column(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
public class DiscriminatorColumnImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorColumn
{
    
    /**  */
	private static final long serialVersionUID = -1894092166591836472L;


	public DiscriminatorColumnImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName NAME$0 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName DISCRIMINATORTYPE$2 = 
        new javax.xml.namespace.QName("", "discriminator-type");
    private static final javax.xml.namespace.QName COLUMNDEFINITION$4 = 
        new javax.xml.namespace.QName("", "column-definition");
    private static final javax.xml.namespace.QName LENGTH$6 = 
        new javax.xml.namespace.QName("", "length");
    
    
    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$0);
            return target;
        }
    }
    
    /**
     * True if has "name" attribute
     */
    public boolean isSetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(NAME$0) != null;
        }
    }
    
    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$0);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$0);
            }
            target.set(name);
        }
    }
    
    /**
     * Unsets the "name" attribute
     */
    public void unsetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(NAME$0);
        }
    }
    
    /**
     * Gets the "discriminator-type" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType.Enum getDiscriminatorType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DISCRIMINATORTYPE$2);
            if (target == null)
            {
                return null;
            }
            return (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "discriminator-type" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType xgetDiscriminatorType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType)get_store().find_attribute_user(DISCRIMINATORTYPE$2);
            return target;
        }
    }
    
    /**
     * True if has "discriminator-type" attribute
     */
    public boolean isSetDiscriminatorType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(DISCRIMINATORTYPE$2) != null;
        }
    }
    
    /**
     * Sets the "discriminator-type" attribute
     */
    public void setDiscriminatorType(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType.Enum discriminatorType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DISCRIMINATORTYPE$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DISCRIMINATORTYPE$2);
            }
            target.setEnumValue(discriminatorType);
        }
    }
    
    /**
     * Sets (as xml) the "discriminator-type" attribute
     */
    public void xsetDiscriminatorType(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType discriminatorType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType)get_store().find_attribute_user(DISCRIMINATORTYPE$2);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.DiscriminatorType)get_store().add_attribute_user(DISCRIMINATORTYPE$2);
            }
            target.set(discriminatorType);
        }
    }
    
    /**
     * Unsets the "discriminator-type" attribute
     */
    public void unsetDiscriminatorType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(DISCRIMINATORTYPE$2);
        }
    }
    
    /**
     * Gets the "column-definition" attribute
     */
    public java.lang.String getColumnDefinition()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COLUMNDEFINITION$4);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "column-definition" attribute
     */
    public org.apache.xmlbeans.XmlString xgetColumnDefinition()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COLUMNDEFINITION$4);
            return target;
        }
    }
    
    /**
     * True if has "column-definition" attribute
     */
    public boolean isSetColumnDefinition()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(COLUMNDEFINITION$4) != null;
        }
    }
    
    /**
     * Sets the "column-definition" attribute
     */
    public void setColumnDefinition(java.lang.String columnDefinition)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COLUMNDEFINITION$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COLUMNDEFINITION$4);
            }
            target.setStringValue(columnDefinition);
        }
    }
    
    /**
     * Sets (as xml) the "column-definition" attribute
     */
    public void xsetColumnDefinition(org.apache.xmlbeans.XmlString columnDefinition)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COLUMNDEFINITION$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(COLUMNDEFINITION$4);
            }
            target.set(columnDefinition);
        }
    }
    
    /**
     * Unsets the "column-definition" attribute
     */
    public void unsetColumnDefinition()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(COLUMNDEFINITION$4);
        }
    }
    
    /**
     * Gets the "length" attribute
     */
    public int getLength()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LENGTH$6);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "length" attribute
     */
    public org.apache.xmlbeans.XmlInt xgetLength()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_attribute_user(LENGTH$6);
            return target;
        }
    }
    
    /**
     * True if has "length" attribute
     */
    public boolean isSetLength()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(LENGTH$6) != null;
        }
    }
    
    /**
     * Sets the "length" attribute
     */
    public void setLength(int length)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LENGTH$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(LENGTH$6);
            }
            target.setIntValue(length);
        }
    }
    
    /**
     * Sets (as xml) the "length" attribute
     */
    public void xsetLength(org.apache.xmlbeans.XmlInt length)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_attribute_user(LENGTH$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_attribute_user(LENGTH$6);
            }
            target.set(length);
        }
    }
    
    /**
     * Unsets the "length" attribute
     */
    public void unsetLength()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(LENGTH$6);
        }
    }
}
